﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Utility1;

namespace Thv.admin.Controls
{
    public partial class menu : System.Web.UI.UserControl
    {
        private string tempath;
        protected void Page_Load(object sender, EventArgs e)
        {
            tempath = WebUtils.SystemUrl();
        }

        protected void ASPxMenu1_ItemClick(object source, DevExpress.Web.ASPxMenu.MenuItemEventArgs e)
        {
            string m = e.Item.Name;
            string link="";
            switch (m)
            {
                case "home":
                    link = tempath + "/admin/index.aspx?page=home";
                    break;
                case "thanhvien":
                    link=tempath+"/admin/index.aspx?page=Thanh-vien";
                    break;
                case "sodo":
                    link = tempath + "/admin/index.aspx?page=So-do";
                    break;
                case "kichhoat":
                    link = tempath + "/admin/index.aspx?page=Kich-hoat";
                    break;
                case "xem":
                    link = tempath + "/admin/index.aspx?page=thong-ke";
                    break;
                case "products":
                    link = tempath + "/admin/index.aspx?page=QuanlySP";
                    break;
                case "tsp":
                    link = tempath + "/admin/index.aspx?page=edit-product";
                    break;
                case "qlQC":
                    link = tempath + "/admin/index.aspx?page=quanly-quangcao";
                    break;
            }
            Response.Redirect(link);
        }
    }
}